From: Sergey Ponomarev Date: Mon, 3 Jun 2024 11:42:41 +0000 (+0300) Subject: luci-app-acme: option staging: show the flag only for letsencrypt X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22http:/www.crowdsec.net/%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22?a=commitdiff_plain;h=72e62c027cbd562909c4fa95ecad0e66d9fda0c6;p=project%2Fluci.git luci-app-acme: option staging: show the flag only for letsencrypt Signed-off-by: Sergey Ponomarev --- diff --git a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js index 8ceaf417f5..4f526fe6a1 100644 --- a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js +++ b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js @@ -174,15 +174,6 @@ return view.extend({ o.modalonly = true; - o = s.taboption('advanced', form.Flag, 'staging', _('Use staging server'), - _( - 'Get certificate from the Letsencrypt staging server ' + - '(use for testing; the certificate won\'t be valid).' - ) - ); - o.rmempty = false; - o.modalonly = true; - o = s.taboption('advanced', form.ListValue, 'key_type', _('Key type'), _('Key size (and type) for the generated certificate.') ); @@ -217,13 +208,24 @@ return view.extend({ o = s.taboption('advanced', form.Value, "acme_server", _("ACME server URL"), _('Use a custom CA instead of Let\'s Encrypt.') + ' ' + _('Custom ACME server directory URL.') + '
' + - '' + _('See more') + '' + '' + _('See more') + '' + '
' + + _('Default') + ' letsencrypt' ); - o.depends("staging", "0"); o.placeholder = "https://api.buypass.com/acme/directory"; o.optional = true; o.modalonly = true; + o = s.taboption('advanced', form.Flag, 'staging', _('Use staging server'), + _( + 'Get certificate from the Letsencrypt staging server ' + + '(use for testing; the certificate won\'t be valid).' + ) + ); + o.depends('acme_server', ''); + o.depends('acme_server', 'letsencrypt'); + o.optional = true; + o.modalonly = true; + o = s.taboption('advanced', form.Value, 'days', _('Days until renewal')); o.optional = true; o.placeholder = 'acme.sh default (60 days)';